#include "OssUploaderTest.h"
#include "OssUploader.h"

using namespace liboss;

TEST_F(OssUploaderTest, case1) {
    OssUploader uploader;
    int ret = uploader.InitUploader("oss-cn-hangzhou.aliyuncs.com", "LTAID2B85OXN8TWu", "9zsoYayR559GdeeuVax08vYZslXzSS");
    ASSERT_EQ(ret, 0);
}

TEST_F(OssUploaderTest, case2) {
    OssUploader uploader;
    int ret = uploader.UploadData("geely-dev", "hello1.txt", "Hello OSS !");
    ASSERT_EQ(ret, 0);
}

TEST_F(OssUploaderTest, case3) {
    OssUploader uploader;
    int ret = uploader.UploadFile("geely-dev", "hello2.txt", "hello.txt");
    ASSERT_EQ(ret, 0);
}